package com.qf.bbapi.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.bbapi.dao.TeaTypeDao;
import com.qf.bbapi.entity.TeaType;
import com.qf.bbapi.service.intf.TeaTypeService;
import com.qf.bbapi.vo.R;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author wodexinhuai
 * @create 2022-07-01-19:41
 */
@Service
public class TeaTypeServiceImpl extends ServiceImpl<TeaTypeDao, TeaType> implements TeaTypeService {
    @Resource
    private TeaTypeDao dao;
    @Override
    public R all() {
        List<TeaType> list = dao.selectList(null);
        if (list.size() > 0){
            //有商品类型
            return R.ok(list);
        }
        return R.fail("暂无种类");
    }
}
